-- GENERATED SPELL FOR [Burning Blade Toxicologist] --


function spell0_12319(pUnit, Event) --@Curse of Agony,n/a--
pUnit:FullCastSpellOnTarget(980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12319', 24000, 1)
end

function spell1_12319(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(689,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_12319', 5000, 1)
end

function spell2_12319(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(707,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12319', 17000, 1)
end

function Sorts_12319(pUnit, Event)
local choix_sorts_12319 = math.random(0, 2)
if choix_sorts_12319 == 0 then
pUnit:RegisterEvent('spell0_12319', 1, 1)
end
if choix_sorts_12319 == 1 then
pUnit:RegisterEvent('spell1_12319', 1, 1)
end
if choix_sorts_12319 == 2 then
pUnit:RegisterEvent('spell2_12319', 1, 1)
end
end

function mob12319_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12319', math.random(1500, 3000), 1)
end

function mob12319_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12319_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12319_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12319, 1, 'mob12319_Action')
RegisterUnitEvent(12319, 2, 'mob12319_Leave')
RegisterUnitEvent(12319, 3, 'mob12319_Kill')
RegisterUnitEvent(12319, 4, 'mob12319_Die')
